home *** CD-ROM | disk | FTP | other *** search
- /*
- PupilMTF.c
- Returns the MTF of a circular pupil of specified diameter at a specified spatial frequency,
- for incoherent light of a specified wavelength. The answer is exact.
-
- Based on:
- Goodman, J. W. (1968) Introduction to Fourier Optics. San Francisco: McGraw-Hill,
- page 120, Eq. 6-31.
- HISTORY:
- 7/6/94 dgp wrote it, again.
- */
- #include "VideoToolbox.h"
- double PupilMTF(double cPerDeg,double diameterMm,double wavelengthNm);
-
- double PupilMTF(double cPerDeg,double diameterMm,double wavelengthNm)
- {
- register double cPerDegMax,f,mtf;
-
- cPerDegMax=(PI/180.)*diameterMm*1e-3/(wavelengthNm*1e-9); /* cycles/degree */
- f=fabs(cPerDeg)/cPerDegMax;
- if(f>=1.)mtf=0.;
- else mtf=(2./PI)*(acos(f)-f*sqrt(1-f*f));
- return mtf;
- }